<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.ArrayList" %>
        <%@ page import="dataSet.CursoComision" %>
    
<%@ page import="entidades.Curso" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<link rel="stylesheet" href="/css/style.css" type="text/css">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sistema de gestion Academia- Inscripcion materia</title>
</head>
<body>
<%
//si esta logeado
if(session.getAttribute("currentSessionUser") != null){
	session.setAttribute("paginaActiva", "Inscripcion");
%>

<%@ include file = "estructura/Header.jsp" %>

<div id="main">
	
	<%@ include file = "estructura/MenuAlumno.jsp" %>
		
	<div id="content">
	<h1>INSCRIPCIONES</h1><br>
		<table>
			<tr>
			<th>ID Curso</th>
			<th>Descripción</th>
			<th>A&ntildeo</th>
			<th>Insc.</th>
			
			</tr>
	
			<tr>
			
			
			
			<%
			if(request.getAttribute("cursosInscripcion") != null){
				ArrayList<CursoComision> listaCursos = new ArrayList<CursoComision>();
				listaCursos = (ArrayList<CursoComision>)request.getAttribute("cursosInscripcion");
				for(CursoComision curso: listaCursos){
		%>
					<tr>
					<td>
		<%	
				out.println(curso.getIdComision() + "</td>");
		%>
					<td>
		<%	
				out.println(curso.getDescripcion() + "</td>");
		%>
					<td>
		<%	
				out.println(curso.getAnioEspecialidad() + "</td>");
				
		%>
		
		<td ><form  action="OpcionesAlumnos" method="get" enctype="multipart/form-data" name="form"><input name="o" id="o" type="hidden"  value="88"><input name="idc"  type="hidden"  value="<%=curso.getIdCurso()%>"><input name="boton" id="boton" value="Inscribirse" type="submit"></form></td>
			<%
				}
			}
		%>	
		</tr>
		</tr>
			</table>
			
	</div>
</div>
<%@ include file = "estructura/Footer.jsp" %>

<%}else{ //no logueado, se redirecciona a login%>



<meta http-equiv="refresh" content="0;URL=Login.jsp">

</html>
<%}%>